package strategy;


/**
 * 策咯模式 实现 数字比较器
 *
 * @author cctv
 */
public class NumberComparator implements java.util.Comparator<MyObj> {
    @Override
    public int compare(MyObj obj1, MyObj obj2) {
        int a = obj1.getNumber();
        int b = obj2.getNumber();

        return a-b;
    }

}
